package com.jetpack.mvvm.lib.base.di

import android.app.Application
import android.content.Context
import com.jetpack.mvvm.lib.base.ShareViewModelImpl
import com.jetpack.mvvm.lib.base.interf.ShareViewModelInterface
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object ShareVMModule {
    @Singleton
    @Provides
    fun provideShareViewModel(@ApplicationContext appContext: Context): ShareViewModelInterface {
        return ShareViewModelImpl(appContext as Application)
    }
}